home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / docume1a / frmprevi < prev    next >
Text File  |  1999-08-07  |  4KB  |  119 lines

  1. VERSION 5.00
  2. Object = "{3B7C8863-D78F-101B-B9B5-04021C009402}#1.2#0"; "RICHTX32.OCX"
  3. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  4. Begin VB.Form frmPreview 
  5.    Caption         =   "                                                                                    Print Preview"
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   165
  8.    ClientTop       =   735
  9.    ClientWidth     =   4680
  10.    ClipControls    =   0   'False
  11.    ControlBox      =   0   'False
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   3195
  14.    ScaleWidth      =   4680
  15.    StartUpPosition =   3  'Windows Default
  16.    WindowState     =   2  'Maximized
  17.    Begin MSComDlg.CommonDialog CommonDialog1 
  18.       Left            =   2160
  19.       Top             =   1320
  20.       _ExtentX        =   847
  21.       _ExtentY        =   847
  22.       _Version        =   393216
  23.    End
  24.    Begin RichTextLib.RichTextBox RichTextBox1 
  25.       Height          =   7500
  26.       Left            =   0
  27.       TabIndex        =   3
  28.       Top             =   480
  29.       Width           =   12000
  30.       _ExtentX        =   21167
  31.       _ExtentY        =   13229
  32.       _Version        =   393217
  33.       Enabled         =   -1  'True
  34.       ScrollBars      =   2
  35.       DisableNoScroll =   -1  'True
  36.       TextRTF         =   $"frmPreview1.frx":0000
  37.    End
  38.    Begin VB.CommandButton Command3 
  39.       Height          =   495
  40.       Left            =   6120
  41.       Picture         =   "frmPreview1.frx":00AE
  42.       Style           =   1  'Graphical
  43.       TabIndex        =   2
  44.       ToolTipText     =   "Closes Preview"
  45.       Top             =   0
  46.       Width           =   975
  47.    End
  48.    Begin VB.CommandButton Command2 
  49.       Height          =   495
  50.       Left            =   5160
  51.       Picture         =   "frmPreview1.frx":01F8
  52.       Style           =   1  'Graphical
  53.       TabIndex        =   1
  54.       ToolTipText     =   "Prints Document"
  55.       Top             =   0
  56.       Width           =   975
  57.    End
  58.    Begin VB.CommandButton Command1 
  59.       Height          =   495
  60.       Left            =   4200
  61.       Picture         =   "frmPreview1.frx":0862
  62.       Style           =   1  'Graphical
  63.       TabIndex        =   0
  64.       ToolTipText     =   "Preview"
  65.       Top             =   0
  66.       Width           =   975
  67.    End
  68.    Begin VB.Menu mnuFile 
  69.       Caption         =   "&File"
  70.       Begin VB.Menu mnuPreview 
  71.          Caption         =   "&Print Preview"
  72.       End
  73.       Begin VB.Menu mnuPrint 
  74.          Caption         =   "&Print"
  75.          Shortcut        =   ^P
  76.       End
  77.       Begin VB.Menu mnu1 
  78.          Caption         =   "-"
  79.       End
  80.       Begin VB.Menu mnuExit 
  81.          Caption         =   "&Exit"
  82.       End
  83.    End
  84. End
  85. Attribute VB_Name = "frmPreview"
  86. Attribute VB_GlobalNameSpace = False
  87. Attribute VB_Creatable = False
  88. Attribute VB_PredeclaredId = True
  89. Attribute VB_Exposed = False
  90. Private Sub Command1_Click()
  91. If boolnew = True Then
  92. RichTextBox1.Text = frmOpenDoc.RichTextBox1.Text
  93. Else
  94. RichTextBox1.LoadFile MDIForm1.CommonDialog1.filename
  95. End If
  96. End Sub
  97. Private Sub Command2_Click()
  98. Call PrintDoc
  99. End Sub
  100. Private Sub Command3_Click()
  101. Unload Me
  102. frmOpenDoc.SetFocus
  103. End Sub
  104. Private Sub mnuExit_Click()
  105. Unload Me
  106. frmOpenDoc.SetFocus
  107. End Sub
  108. Private Sub mnuPreview_Click()
  109. If boolnew = True Then
  110. RichTextBox1.Text = frmOpenDoc.RichTextBox1.Text
  111. Else
  112. RichTextBox1.LoadFile MDIForm1.CommonDialog1.filename
  113. End If
  114. End Sub
  115. Private Sub mnuPrint_Click()
  116. Call PrintDoc
  117. End Sub
  118.  
  119.